widget: Correctly handle which widgets to include in the clip
authorBenjamin Otte <otte@redhat.com>
Thu, 22 Jan 2015 13:33:26 +0000 (14:33 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 22 Jan 2015 15:25:35 +0000 (16:25 +0100)
Previously, we would not include any child widget on the first
allocation, which happens right after realize(), but before map(). No
widget is drawable at that point.

gtk/gtkwidget.c

index 73001fd71b624a8976e98e82808c397fd801b2eb..575db60efd3153f249448d4170deb1070981c9a9 100644 (file)
@@ -15578,7 +15578,8 @@ union_with_clip (GtkWidget *widget,
 {
   GtkAllocation widget_clip;
 
-  if (!gtk_widget_is_drawable (widget))
+  if (!gtk_widget_is_visible (widget) ||
+      !gtk_widget_get_child_visible (widget))
     return;
 
   gtk_widget_get_clip (widget, &widget_clip);